package com.like.likeutils.util;

import android.os.CountDownTimer;

public class TimeCount extends CountDownTimer {

	private TimeListener mListener;

	public TimeCount(long millisInFuture, long countDownInterval,
			TimeListener listener) {
		super(millisInFuture, countDownInterval);
		this.mListener = listener;
	}

	@Override
	public void onTick(long millisUntilFinished) {
		mListener.onTick(millisUntilFinished);
	}

	@Override
	public void onFinish() {
		mListener.onFinish();
	}

	public interface TimeListener {
		void onTick(long millisUntilFinished);

		void onFinish();
	}

}
